﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace EFong.Contract
{
    [DataContract]
    public class TouringPartyItem
    {
        private Guid _id = Guid.NewGuid();
        [DataMember]
        public Guid ID
        {
            get { return _id; }
            set { _id = value; }
        }

        private int _seq;
        [DataMember]
        public int Seq
        {
            get { return _seq; }
            set { _seq = value; }
        }

        private string _name = string.Empty;
        [DataMember]
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        // 车票 门票 酒店 租车 用餐 其他
        private string _type = string.Empty;
        [DataMember]
        public string Type
        {
            get { return _type; }
            set { _type = value; }
        }

        private TourItemType _sType;
        public TourItemType SType
        {
            get { return _sType; }
            set { _sType = value; }
        }

        private RVendor _vendor;
        [DataMember]
        public RVendor Vendor
        {
            get { return _vendor; }
            set { _vendor = value; }
        }

        //只计大人,只计儿童,大人和儿童
        private string _calcType = string.Empty;
        [DataMember]
        public string CalcType
        {
            get { return _calcType; }
            set { _calcType = value; }
        }

        private decimal _price;
        [DataMember]
        public decimal Price
        {
            get { return _price; }
            set { _price = value; }
        }

        private decimal? _vendorPrice;
        [DataMember]
        public decimal? VendorPrice
        {
            get { return _vendorPrice; }
            set { _vendorPrice = value; }
        }

        //private decimal _totalPrice;
        //[DataMember]
        public decimal TotalPrice
        {
            get { return this.Qty * this.Price; }
        }

        private decimal _totalVendorPrice;
        [DataMember]
        public decimal TotalVendorPrice
        {
            get { return _totalVendorPrice; }
            set { _totalVendorPrice = value; }
        }

        public decimal Profit
        {
            get { return TotalPrice - TotalVendorPrice; }
        }

        private decimal _qty;
        [DataMember]
        public decimal Qty
        {
            get { return _qty; }
            set { _qty = value; }
        }

        private string _um = string.Empty;
        [DataMember]
        public string UM
        {
            get { return _um; }
            set { _um = value; }
        }

        private string _remark = string.Empty;
        [DataMember]
        public string Remark
        {
            get { return _remark; }
            set { _remark = value; }
        }
    }
}
